﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;

namespace PuzzleMaker
{
    public class GameObject
    {
        string name;
        string tag;
        string data;
        string waypointMode;
        Point position;
        Size size;
        bool useWaypoints;
        bool useEvents;
        List<Point> waypoints;
        List<Event> events;
        int selectedWaypoint;
        int imageID;

        public GameObject()
        {
            name = "";
            tag = "";
            data = "";
            waypointMode = "None";
            useWaypoints = false;
            useEvents = false;
            waypoints = new List<Point>();
            events = new List<Event>();
            imageID = -1;
            selectedWaypoint = -1;
        }

        public GameObject(string name)
        {
            this.name = name;
            tag = "";
            data = "";
            waypointMode = "None";
            useWaypoints = false;
            useEvents = false;
            waypoints = new List<Point>();
            events = new List<Event>();
            imageID = -1;
            selectedWaypoint = -1;
        }

        public override string ToString()
        {
            if (tag != "")
                return name + " - " + tag;
            else
                return name + " - untagged";
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        public string Tag
        {
            get { return tag; }
            set { tag = value; }
        }
        public string Data
        {
            get { return data; }
            set { data = value; }
        }
        public string WaypointMode
        {
            get { return waypointMode; }
            set { waypointMode = value; }
        }
        public Point Position
        {
            get { return position; }
            set { position = value; }
        }
        public Size Size
        {
            get { return size; }
            set { size = value; }
        }
        public Rectangle Bounds
        {
            get { return new Rectangle(position, size); }
        }
        public int X
        {
            get { return position.X; }
            set { position.X = value; }
        }
        public int Y
        {
            get { return position.Y; }
            set { position.Y = value; }
        }
        public int Width
        {
            get { return size.Width; }
            set { size.Width = value; }
        }
        public int Height
        {
            get { return size.Height; }
            set { size.Height = value; }
        }
        public int ImageID
        {
            get { return imageID; }
            set { imageID = value; }
        }
        public int SelectedWaypoint
        {
            get { return selectedWaypoint; }
            set { selectedWaypoint = value; }
        }
        public bool UseWaypoints
        {
            get { return useWaypoints; }
            set { useWaypoints = value; }
        }
        public bool UseEvents
        {
            get { return useEvents; }
            set { useEvents = value; }
        }
        public List<Point> Waypoints
        {
            get { return waypoints; }
            set { waypoints = value; }
        }
        public List<Event> Events
        {
            get { return events; }
            set { events = value; }
        }
    }
}
